<template></template>

<script>
import { defineComponent } from "vue";
import {
  ALIGNMENT,
  DIRECTION,
  SCROLL_CHANGE_REASON,
  marginProp,
  oppositeMarginProp,
  positionProp,
  scrollProp,
  sizeProp,
} from "../utils/constants";
export default defineComponent({
  name: "virtual-list",
  props: {
    className: {
      type: String,
      default: "",
    },
    estimatedItemSize: {
      type: Number,
      default: 0,
    },
    width: {
      type: Number | String,
      default: "auto",
    },
    height: {
      type: Number | String,
      required: true,
    },
    itemCount: {
      type: Number,
      required: true,
    },
    // itemSize: ItemSize;
    overscanCount: {
      type: Number,
      default: 0,
    },
    scrollOffset: {
      type: Number,
      default: 0,
    },
    scrollToIndex: {
      type: Number,
      default: 0,
    },
    scrollToAlignment: {
      type: ALIGNMENT,
      default: 0,
    },
    scrollDirection: {
      type: DIRECTION,
      default: 0,
    },
    stickyIndices: {
      type: Array,
      default: [0],
    },
    propE: {
      type: Object,
      // 数组/对象的默认值应当由一个工厂函数返回
      default: function () {
        return { message: "hello" };
      },
      // 自定义验证函数
      validator: function (value) {
        return value > 10;
      },
    },
    // style?: React.CSSProperties;
    // onItemsRendered?({startIndex, stopIndex}: RenderedRows): void;
    // onScroll?(offset: number, event: UIEvent): void;
    // renderItem(itemInfo: ItemInfo): React.ReactNode;
  },
  setup(props, context) {},
});
</script>

<style></style>
